﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using V5_Common;
using System.Data;
using V5_Common.FrameWork;
namespace V5_Data {
    public class V5UserHelper : IV5Helper {
        private static readonly V5UserHelper m_Instance = new V5UserHelper();
        /// <summary>
        /// 
        /// </summary>
        public static V5UserHelper Instance {
            get { return m_Instance; }
        }

        /// <summary>
        /// 检查用户是否登陆
        /// </summary>
        /// <returns></returns>
        public bool CheckLogin() {
            if (HttpContext.Current.Request.Cookies["memberid"] != null) {
                int userid = InputHelper.SetNumber(HttpContext.Current.Request.Cookies["memberid"].Value);
                return true;
            }
            return false;
        }

        #region

        public DataTable Query_By(string what, string where, string orderby, int limit) {
            return V5.SQL.Query_By(what, "Tbl_User", where, orderby, limit);
        }

        public DataTable Query_By_List(string what, string where, string orderby, int limit) {
            throw new NotImplementedException();
        }

        public DataTable Query_By_Pager(string what, string where, string orderby, int limit, int pageIndex, string UrlList) {
            throw new NotImplementedException();
        }

        public DataRow Get_By(string ID) {
            throw new NotImplementedException();
        }

        public DataRow Get_By_List(string ClassID) {
            throw new NotImplementedException();
        }

        public string UrlIndex() {
            throw new NotImplementedException();
        }

        public string UrlIndex(int showType) {
            throw new NotImplementedException();
        }

        public string UrlView(object attributes, int showType) {
            throw new NotImplementedException();
        }

        public string UrlList(object attributes, int showType) {
            throw new NotImplementedException();
        }

        public string UrlSearch(object attributes) {
            throw new NotImplementedException();
        }

        public string UrlSearch(object attributes, int showType) {
            throw new NotImplementedException();
        }
        #endregion






        public string UrlView(object attributes) {
            throw new NotImplementedException();
        }

        public string UrlList(object attributes) {
            throw new NotImplementedException();
        }
    }
}